/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session.TX;

import entity.PurchasedItem;
import entity.PurchasedItem_GroupOn;
import entity.PurchasedItem_Regular;
import java.util.Calendar;
import java.util.List;
import javax.ejb.Remote;

/**
 *
 * @author Randall Chia
 */
@Remote
public interface TransactionManagerSBRemote {


        public void createTransactionEntry(
            Calendar time_stamp,
            String customerEmail,
            Integer loyaltyPointsAwarded,
            Double subtotal,
            List<PurchasedItem> items
            );

    public entity.PurchasedItem createPurchasedItem_Regular(java.util.Calendar time_stamp, 
    java.lang.String customerEmail, java.lang.String seller, java.lang.String item_name, 
    java.lang.Long item_id, java.lang.Double item_total_price, java.lang.String buyer_country, 
    java.lang.Integer buyer_age, java.lang.Long outlet_id, java.lang.Integer quantity, java.lang.String outletName, java.lang.Long stakeholderId, java.lang.Long customerId);

    public PurchasedItem createPurchasedItem_GroupOn(Long item_id,
            String itemName,
            String itemDesc,
            Calendar time_stamp,
            String customerEmail,
            String seller,
            Long customerId,
            Integer qty,
            Double subtotal);
    
    public List<PurchasedItem_Regular> retrievePurchasedItemRegular(String customerEmail, Long outletID, boolean filterByOutlet);
    
    public List<PurchasedItem_GroupOn> retrievePurchasedItemGroupon(String customerEmail, String stakeholderName, boolean filterByStakeholder);
    
    public void redeemPurchases(Long id);
    
    public boolean redeemGroupon(Long id, int qty);

}
